package com.hirain.command;

/**
 * Created by caicf on 2016/8/24.
 */
public class TestMode {

    @org.junit.Test
    public void test() {
        SimpleRemoteControl control=new SimpleRemoteControl();
        Light light=new Light();
        Command command=new LightOnCommand(light);
        control.setCommand(command);
        control.buttonWasPressed();
        control.canel();

        Phone phone=new Phone();
        Command call=new PhoneCallCommand(phone);
        control.setCommand(call);
        control.buttonWasPressed();
        control.canel();
    }
}
